<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<link rel="stylesheet" href="${initParam.root }/css/board/main_boardWriteUpdate.css">
<!-- 스크립트 부분 -->
<script type="text/javascript">
	$(document).ready(function(){
		$("#confirm_btn").click(function(){
			if($("#free_title").val()==""){
				alert("제목을 입력하세요~");	
				$("#free_title").focus();
				return false;
			}else if($("#content").val()==""){
				alert("내용을 입력하세요");
				$("#content").focus();
				return false;
			}
			$("#freeForm").submit();
		});
	});
</script>

<!-- body 부분 -->
<div id="전체틀">
	<header id="title">
		<font><b>글쓰기</b></font>
	</header>
	<div id="write">
		<form action="board.do" method="post" name="freeForm" enctype="multipart/form-data" id="freeForm">
		<input type="hidden" name="command" value="freeWrite">
			<table>
				<tr>
					<td>제목</td><td><input type="text" name="b_title" maxlength="100" size="30" id="free_title"></td>
				</tr>
				<tr> 
					<td>파일</td><td><input type="file" name="uploadFile"></td>
				</tr>
				<tr>
					<td colspan="2"><textarea cols="35" rows="10" name="b_content" id="content"></textarea></td>
				</tr> 
				<tr>
					<td colspan="2"  ><img alt="#" src="${initParam.root }/img/paging/confirm.gif" id="confirm_btn"></td>  
				</tr>
			</table>
		</form>
	</div>
</div>